#!/bin/bash

mvn clean package -Dmaven.test.skip=true -pl feign-registry -am

if [ $? -eq 0 ]; then
    echo "====== feign-registry maven build SUCCESS ======"
else
    echo "!!!!!! feign-registry maven build FAIL !!!!!!"
    exit 1
fi

rm registry_docker/feign-registry.tar.gz

tar -zcvf feign-registry.tar.gz feign-registry/target/feign-registry-0.0.1-SNAPSHOT.jar registry_docker/start.sh

mv feign-registry.tar.gz registry_docker/